package com.hc.model.code04.test3;

/**
 * @version v1.0
 * @ClassName: Client
 * @Description: 案例测试类
 * @Author: HC
 */
public class Client {

    public static void main(String[] args) {
        // 创建服务员类
        Waiter waiter = new Waiter();
        // 创建厨师类
        SeniorChef chef = new SeniorChef();

        // 一号桌
        Order order1 = new Order();
        order1.setDiningTable(1);
        order1.setFood("炒鱼", 2);
        order1.setFood("蛋炒饭", 1);

        // 二号桌
        Order order2 = new Order();
        order2.setDiningTable(2);
        order2.setFood("青椒肉丝", 1);
        order2.setFood("炒面", 1);

        Command c1 = new OrderCommand(chef, order1);
        Command c2 = new OrderCommand(chef, order2);

        // 厨师完成订单
        waiter.setCommands(c1);
        waiter.setCommands(c2);

        waiter.orderUp();
    }
}
